package net.monare.mifss.admin.ui.wiz.cards;

import net.monare.mifss.MifssMessages;
import net.monare.mifss.admin.ui.mod.StorageDefUiModule;
import net.monare.mifss.configurations.pojo.StorageDef;


public class StorageCard extends BaseWizardCard implements CardValidation{

	private static final long serialVersionUID = -1443764629165732698L;
	
	private StorageDefUiModule storageDefUiModule;
	
	public StorageCard(){
		
		super(MifssMessages.getMessage("title.add.storage.wizard.card.2"), "STORAGE_CARD");
		
		storageDefUiModule = new StorageDefUiModule();
		addFormComponent(storageDefUiModule);
		
	}
	
	public StorageDef getStorageDef() {
		return storageDefUiModule.getStorageDef();
	}

	public boolean isCardValid() {
		if(getStorageDef() != null){
			return true;
		} else {
			return false;
		}
	}

	@Override
	public void validateCard() {
		// TODO Auto-generated method stub
		
	}

    public String getStorageSetName() {
        return storageDefUiModule.getStorageSetName();
    }
}
